/*
 * @Descripttion: 批次管理
 * @Author: 何伟伦 weilun@ssc-hn.com
 * @Date: 2024-04-11
 * @LastEditors: 何伟伦 weilun@ssc-hn.com
 * @LastEditTime: 2024-04-16
 */
import request from '/@/api/request'

/** 获取批次列表 */
export const requestGetBatchList = (data: GetBatchListTypes.IRequest) => {
  return request.post<IPaginationResponse<GetBatchListTypes.IResponse[]>>('/business/tracecode/batch/list/V1', data)
}
/** 商品列表-用于批次分页查询条件选择 */
export const requestGetBatchGoodsList = (data: GetAllGoodsTypes.IRequest) => {
  return request.get<IBaseResponse<GetAllGoodsTypes.IResponse[]>>('/business/tracecode/batch/goodList/V1', data)
}
/** 批次作废 */
export const requestCancelBatch = (data: CancelBatchTypes.IRequest) => {
  return request.get<IBaseResponse<CancelBatchTypes.IResponse>>('/business/tracecode/batch/cancel/V1', data)
}
/** 生成批次编号 */
export const requestCreateBatchNumber = (data: CreateBatchNumberTypes.IRequest) => {
  return request.get<IBaseResponse<CreateBatchNumberTypes.IResponse>>('/business/tracecode/batch/getBatchNumber/V1', data)
}
/** 批次添加 */
export const requestAddBatch = (data: AddBatchTypes.IRequest) => {
  return request.post<IBaseResponse<AddBatchTypes.IResponse>>('/business/tracecode/batch/add/V1', data)
}
/** 批次修改 */
export const requestUpdateBatch = (data: UpdateBatchTypes.IRequest) => {
  return request.post<IBaseResponse<UpdateBatchTypes.IResponse>>('/business/tracecode/batch/update/V1', data)
}
/** 获取批次详情（回显） */
export const requestGetBatchDetail = (data: GetBatchDetailTypes.IRequest) => {
  return request.get<IBaseResponse<GetBatchDetailTypes.IResponse>>('/business/tracecode/batch/getById/V1', data)
}
/** 批次导出 */
export const requestExportBatch = (data: ExportBatchTypes.IRequest) => {
  return request.downTxt<IBaseResponse<ExportBatchTypes.IResponse>>('/business/tracecode/batch/export/V1', data)
}
